<template>
  <div id="app">
    <router-view v-if="isRouterAlive"></router-view>
  </div>
</template>

<script>
import NProgress from 'nprogress'
export default {
  name: 'App',
  provide(){
      return{
        reload:this.reload
      }
  },
  data(){
      return {
        isRouterAlive:true
      }
  },
  methods:{
      reload(){
         NProgress.start()
        this.isRouterAlive = false;
        this.$nextTick(function(){
          this.isRouterAlive = true;
           NProgress.done()
        })
      }
  }
}
</script>

<style>
  /* css reset from normalize*/

  html {
    line-height: 1.15; /* 1 */
    -ms-text-size-adjust: 100%; /* 2 */
    -webkit-text-size-adjust: 100%; /* 2 */
  }

  body {
    margin: 0;
  }
	.fl{
		float: left;
	}
	.fr{
		float: right;
	}
	.clear{
		overflow: hidden;
	}
  /* 上下拉动滚动条时卡顿、慢 */
  body {
    -webkit-overflow-scrolling: touch;
    overflow-scrolling: touch;
  }
  #app{
    height: 100vh;
    width: 100vw;
    box-sizing: border-box;
  }
</style>
